package com.zhw.learning.thread;

/**
 * @author zhw
 */
public class ThreadTest{
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();

        Runnable runnable = new MyRunnable();
        Thread thread = new Thread(runnable);
        thread.start();
    }
}

class MyThread extends Thread{
    @Override
    public void run() {
        super.run();
        System.out.println("extends Thread");
    }
}

class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("implements Runnable");
    }
}
